-
-
Notifications
You must be signed in to change notification settings - Fork 423
Fix db::serialize() crashing with Electron #1036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix db::serialize() crashing with Electron #1036
Conversation
thanks for this fix! |
@DamienEspitallier @JoshuaWise @mceachen isn't the if/else backwards? Reversing it fixes #1223 and the original #981 For repro I still use the minimal: const Database = require('better-sqlite3');
const db = new Database(':memory:');
db.exec('CREATE TABLE foo (id)');
console.log(db.serialize()); |
Or maybe it is the wrong flag now? Turns out it actually works with 8.6.0 but for 11.1.2 it does not. I'm confused. Edit: Can confirm that however, this does not work (basically the original code): but this works: Someone smarter and more patient than me pls explain. Did they invert the flag on us? Looking through https://grep.app/search?q=V8_COMPRESS_POINTERS_IN_SHARED_CAGE this is also super rarely used so maybe nobody noticed?
|
Can a fix for this be expected in the near future? |
Fix buffer create in sandbox mode (electron)
Is this going to be fixed? Edit: fixed myself. #1373 |
This is a fix for #981
It use a #ifdef encapsulation to only use the copy method on electron build.
This is the first time I use lzz and I did not achieve to output #ifndef/else/endif clause from the database.lzz file, so I use the macro.lzz instead. I hope this is acceptable :).